package org.project3.beans;

import org.project3.annotations.Constraints;
import org.project3.annotations.DBtable;
import org.project3.annotations.SQLType;

@DBtable(name = "Product115533")
public class Product {
    @SQLType(dbtype="int",constraints=@Constraints(primaryKey=true))
    private int pid;
    @SQLType(dbtype="varchar(20)")
    private String pname;
    @SQLType(dbtype="numeric(10,2)",constraints=@Constraints)
    private double price;

    public Product() {
    }

    public Product(int pid, String pname, double price) {
        this.pid = pid;
        this.pname = pname;
        this.price = price;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
